<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<table width="80%" border="1" cellspacing="0" cellpadding="4"
       align="center">
     <tr>
        <th>Login</th>
        <th>FirstName</th>
        <th>LastName</th>
        <th>Age</th>
        <th>Role</th>
        <th>Actions</th>
    </tr>

    <c:forEach items="${users}" var="user">
        <tr>
            <td>${user.login}</td>
            <td>${user.firstName}</td>
            <td>${user.lastName}</td>
            <td>${user.age}</td>
            <td>${user.role.name}</td>

            <td><a href="EditUser?login=${user.login}&id=${user.id}">Edit</a> &nbsp
                <a href="RemoveUser?id=${user.id}" onclick="return confirm('Are you sure?')">Delete</a>
            </td>

        </tr>
    </c:forEach>

</table>
